#ifndef MY_HEADER_H
#define MY_HEADER_H

// 定义自定义宏
#define ARGS_CHECK(argc, expected) do { \
    if (argc != expected) { \
        fprintf(stderr, "Usage: %s path mode\n", argv[0]); \
        exit(EXIT_FAILURE); \
    } \
} while(0)

#define ERROR_CHECK(ret, err_val, func_name) do { \
    if (ret == err_val) { \
        perror(func_name); \
        exit(EXIT_FAILURE); \
    } \
} while(0)

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
#include <stdbool.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/types.h>
#include <dirent.h>
#include <fcntl.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <errno.h>
#include <sys/epoll.h>
#include <sys/eventfd.h>
#include <poll.h>
#include <cstdint>
#endif